package com.sinosoft.dsp.component.bpm.viewbean.event;

import java.util.ArrayList;
import java.util.List;

import com.sinosoft.dsp.component.bpm.service.core.BpmSelectItemsService;
import com.sinosoft.dsp.component.bpm.viewbean.BpmTimerObject;
import com.sinosoft.dsp.component.bpm.viewbean.event.part.BpmEventEventListenerObject;
import com.sinosoft.dsp.platform.components.AbstractViewBean;
import com.sinosoft.dsp.system.core.exception.SinoException;
import com.sinosoft.dsp.system.to.IGenericTO;

public class BpmActivityAddEventViewBean extends AbstractViewBean implements
		IBpmActivityAddEventViewBean {

	private static final long serialVersionUID = 5516767322854204570L;

	// 事件触发类别
	private String event = BpmSelectItemsService.SELECT_ITEM_EVENTTYPE_DEFAULT;

	// 执行方式
	private String continueType = BpmSelectItemsService.SELECT_ITEM_CONTINUE_DEFAULT;

	// 事件定时器
	private BpmTimerObject timer = new BpmTimerObject();

	// 事件
	private List<IBpmActivityEventObject> events = new ArrayList<IBpmActivityEventObject>();

	@Override
	public void init(IGenericTO tos) throws SinoException {
		BpmEventEventListenerObject el = new BpmEventEventListenerObject();
		el.setClose(false);
		this.events.add(el);
	}

	public String getEvent() {
		return event;
	}

	public void setEvent(String event) {
		this.event = event;
	}

	public String getContinueType() {
		return continueType;
	}

	public void setContinueType(String continueType) {
		this.continueType = continueType;
	}

	public BpmTimerObject getTimer() {
		return timer;
	}

	public void setTimer(BpmTimerObject timer) {
		this.timer = timer;
	}

	public List<IBpmActivityEventObject> getEvents() {
		return events;
	}

	public void setEvents(List<IBpmActivityEventObject> events) {
		this.events = events;
	}

}
